package com.group.three.mapper;


import com.group.three.entity.myOrder.OrderBuyerInformation;
import com.group.three.entity.myOrder.OrderLog;
import com.group.three.entity.myOrder.OrderSimpleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * * 会员订单表 Mapper 接口
 */
@Mapper
public interface OrderBuyerMapper {

    //查询会员用户订单信息并分页， 通过会员id，分页信息，和订单状态
    List<OrderBuyerInformation> selectBuyerOrder(@Param(value = "memberId") String memberId, @Param(value = "pageNumber")int pageNumber, @Param(value = "pageSize")int pageSize, @Param(value = "tag")String tag,@Param(value = "keywords")String keywords);


    //通过订单id查询会员用户订单详情信息
    List<OrderSimpleVO> selectBuyerOrderItem(@Param(value = "orderSn") String orderSn);
    //通过订单id查询会员用户订单日志
    List<OrderLog>  selectBuyerOrderItemLog(@Param(value = "orderSn") String orderSn);
    //通过订单id确认收货
    int sureReceived(String orderSn);
    //取消订单
    int cancelOrder(@Param(value = "orderSn")String orderSn ,  @Param(value = "reason") String reason);
    //删除订单
    int deleteOrder(@Param(value = "orderSn")String orderSn);
}
